1. Field of the Invention
The present invention relates to an image capturing apparatus and a control method therefor, and in particular to an image capturing apparatus that has an autofocus function and a control method therefor.
2. Description of the Related Art
When capturing an image of a person, it is common to focus on the person's face, especially on the person's eyes. However, it is not easy to manually focus on the eyes. Although recent cameras have an autofocus function, they do not automatically focus on the eyes. Cameras need to detect the face and the eyes of a subject included in a field of view in order to automatically focus on the eyes.
One method for detecting the face and the eyes of a person from an image is to store a face region as a template image, and consider a region that has the highest correlation with the template image in an image to be searched as a corresponding face region (template matching). For example, a summation of differences between values of pixels in a partial image of the template image and values of corresponding pixels in a partial image of the image to be searched is obtained. This summation is performed repeatedly while changing the position at which the pair of partial images is cut out. A partial image at the position corresponding to the smallest summation is determined as a region that has the highest correlation with the template image.
On the other hand, Japanese Patent Laid-Open No. 2010-92199 suggests a method for detecting a person's face and eyes from an image using detectors that have acquired knowledge based on various feature amounts with the aid of boosting.
Template matching enables high-speed processing as it requires simple calculation. Template matching can be performed on each frame also when capturing a video and when performing continuous shooting. However, as the determination is performed based on the summation of differences between values of pixels, specific position information showing the positions of the eyes and the mouth in the searched partial image cannot be obtained.
On the other hand, although the method described in Japanese Patent Laid-Open No. 2010-92199 allows detecting the positions of the eyes and the mouth in the face, it requires an enormous amount of calculation to detect the face. Therefore, when this method is used in an ordinary image capturing apparatus with low processing capability, it is expected that the shutter response will slow down and this method cannot be used when taking a video and when performing continuous shooting.
As set forth above, with conventional technology, the face and the eyes in the face cannot be detected from a plurality of images captured at a short interval, such as video frames and frames captured through continuous shooting. Therefore, conventional technology does not allow automatic focusing on the face and the eyes at high speed. This problem of conventional technology is applicable to general autofocus control for both the face of a person and certain parts of a subject.